﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_DinhKhoanNhapKhau : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("AdvTKCoThueGTGT")]
        private ADVAccount _AdvTKCoThueGTGT;
        [AccessedThroughProperty("AdvTKNoThueGTGT")]
        private ADVAccount _AdvTKNoThueGTGT;
        [AccessedThroughProperty("AdvTKThanhToan")]
        private ADVAccount _AdvTKThanhToan;
        [AccessedThroughProperty("AdvTKThueNhapKhau")]
        private ADVAccount _AdvTKThueNhapKhau;
        [AccessedThroughProperty("CmdCancel")]
        private Button _CmdCancel;
        [AccessedThroughProperty("CmdOK")]
        private Button _CmdOK;
        [AccessedThroughProperty("GroupBox1")]
        private GroupBox _GroupBox1;
        [AccessedThroughProperty("Label18")]
        private Label _Label18;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label20")]
        private Label _Label20;
        [AccessedThroughProperty("Label62")]
        private Label _Label62;
        public string cFrmKhoa;
        private IContainer components;
        private bool mGhiSo;
        private clsNhapKho objNK;

        public Frm_DinhKhoanNhapKhau()
        {
            base.Load += new EventHandler(this.Frm_DinhKhoanNhapKhau_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.objNK = new clsNhapKho();
            this.cFrmKhoa = "";
            this.mGhiSo = false;
            this.InitializeComponent();
        }

        public bool CheckIvalidRegister()
        {
            if (this.AdvTKThanhToan.Value == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập t\x00e0i khoản thanh to\x00e1n!", ""));
                this.AdvTKThanhToan.Focus();
                return false;
            }
            if ((this.objNK.TienThueNhapKhauNT != 0.0) && (this.AdvTKThueNhapKhau.Value == ""))
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập t\x00e0i khoản thuế nhập khẩu!", ""));
                this.AdvTKThueNhapKhau.Focus();
                return false;
            }
            if (this.objNK.TienThueVATNT != 0.0)
            {
                if (this.AdvTKNoThueGTGT.Value == "")
                {
                    LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập t\x00e0i khoản nợ thuế VAT!", ""));
                    this.AdvTKNoThueGTGT.Focus();
                    return false;
                }
                if (this.AdvTKCoThueGTGT.Value == "")
                {
                    LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập t\x00e0i khoản c\x00f3 thuế VAT!", ""));
                    this.AdvTKCoThueGTGT.Focus();
                    return false;
                }
            }
            return true;
        }

        private void CmdOK_Click(object sender, EventArgs e)
        {
            if (this.CheckIvalidRegister() && this.objNK.Registered(this.cFrmKhoa, this.AdvTKThanhToan.Value, this.AdvTKThueNhapKhau.Value, this.AdvTKNoThueGTGT.Value, this.AdvTKCoThueGTGT.Value))
            {
                this.mGhiSo = true;
                this.Close();
            }
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void Frm_DinhKhoanNhapKhau_Load(object sender, EventArgs e)
        {
            this.objNK.Load(this.cFrmKhoa);
            if (this.objNK.KhoaTKThanhToan.Trim() == "")
            {
                this.AdvTKThanhToan.Value = modGeneral.H_DEFAULT.Item("H_NKH_TKCHU").GiaTri.ToString().Trim();
            }
            else
            {
                this.AdvTKThanhToan.Value = this.objNK.KhoaTKThanhToan;
            }
            if (this.objNK.KhoaTKThueNK.Trim() == "")
            {
                this.AdvTKThueNhapKhau.Value = modGeneral.H_DEFAULT.Item("H_NKH_TKTHUENK").GiaTri.ToString().Trim();
            }
            else
            {
                this.AdvTKThueNhapKhau.Value = this.objNK.KhoaTKThueNK;
            }
            if (this.objNK.KhoaTKNoThueVAT.Trim() == "")
            {
                this.AdvTKNoThueGTGT.Value = modGeneral.H_DEFAULT.Item("H_NKH_TKNOTHUE").GiaTri.ToString().Trim();
            }
            else
            {
                this.AdvTKNoThueGTGT.Value = this.objNK.KhoaTKNoThueVAT;
            }
            if (this.objNK.KhoaTKCoThueVAT.Trim() == "")
            {
                this.AdvTKCoThueGTGT.Value = modGeneral.H_DEFAULT.Item("H_NKH_TKCOTHUE").GiaTri.ToString().Trim();
            }
            else
            {
                this.AdvTKCoThueGTGT.Value = this.objNK.KhoaTKCoThueVAT;
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_DinhKhoanNhapKhau));
            this.GroupBox1 = new GroupBox();
            this.AdvTKCoThueGTGT = new ADVAccount();
            this.Label62 = new Label();
            this.Label20 = new Label();
            this.AdvTKNoThueGTGT = new ADVAccount();
            this.Label18 = new Label();
            this.Label2 = new Label();
            this.AdvTKThueNhapKhau = new ADVAccount();
            this.AdvTKThanhToan = new ADVAccount();
            this.CmdCancel = new Button();
            this.CmdOK = new Button();
            this.GroupBox1.SuspendLayout();
            this.SuspendLayout();
            this.GroupBox1.Controls.Add(this.AdvTKCoThueGTGT);
            this.GroupBox1.Controls.Add(this.Label62);
            this.GroupBox1.Controls.Add(this.Label20);
            this.GroupBox1.Controls.Add(this.AdvTKNoThueGTGT);
            this.GroupBox1.Controls.Add(this.Label18);
            this.GroupBox1.Controls.Add(this.Label2);
            this.GroupBox1.Controls.Add(this.AdvTKThueNhapKhau);
            this.GroupBox1.Controls.Add(this.AdvTKThanhToan);
            Point point = new Point(6, 5);
            this.GroupBox1.Location = point;
            this.GroupBox1.Name = "GroupBox1";
            Size size = new Size(0x19e, 0x8d);
            this.GroupBox1.Size = size;
            this.GroupBox1.TabIndex = 0;
            this.GroupBox1.TabStop = false;
            this.GroupBox1.Text = "Định khoản";
            this.AdvTKCoThueGTGT.Conditions = "";
            this.AdvTKCoThueGTGT.FieldNameFilter = "Left(SoTaiKhoan,3)";
            this.AdvTKCoThueGTGT.KeyFilter = "333";
            point = new Point(0x76, 0x6a);
            this.AdvTKCoThueGTGT.Location = point;
            Padding padding = new Padding(0);
            this.AdvTKCoThueGTGT.Margin = padding;
            this.AdvTKCoThueGTGT.Name = "AdvTKCoThueGTGT";
            this.AdvTKCoThueGTGT.OnlyDigit = false;
            this.AdvTKCoThueGTGT.ReadOnly = false;
            size = new Size(290, 20);
            this.AdvTKCoThueGTGT.Size = size;
            this.AdvTKCoThueGTGT.TabIndex = 0x26;
            this.AdvTKCoThueGTGT.UpperText = true;
            this.AdvTKCoThueGTGT.Value = "";
            this.AdvTKCoThueGTGT.WithCode = 80;
            this.Label62.AutoSize = true;
            point = new Point(12, 0x6d);
            this.Label62.Location = point;
            this.Label62.Name = "Label62";
            size = new Size(0x67, 13);
            this.Label62.Size = size;
            this.Label62.TabIndex = 0x25;
            this.Label62.Text = "TK c\x00f3 (Thuế GTGT)";
            this.Label20.AutoSize = true;
            point = new Point(12, 0x54);
            this.Label20.Location = point;
            this.Label20.Name = "Label20";
            size = new Size(0x67, 13);
            this.Label20.Size = size;
            this.Label20.TabIndex = 0x23;
            this.Label20.Text = "TK nợ (Thuế GTGT)";
            this.AdvTKNoThueGTGT.Conditions = "";
            this.AdvTKNoThueGTGT.FieldNameFilter = "Left(SoTaiKhoan,3)";
            this.AdvTKNoThueGTGT.KeyFilter = "133";
            point = new Point(0x76, 0x51);
            this.AdvTKNoThueGTGT.Location = point;
            padding = new Padding(0);
            this.AdvTKNoThueGTGT.Margin = padding;
            this.AdvTKNoThueGTGT.Name = "AdvTKNoThueGTGT";
            this.AdvTKNoThueGTGT.OnlyDigit = false;
            this.AdvTKNoThueGTGT.ReadOnly = false;
            size = new Size(290, 20);
            this.AdvTKNoThueGTGT.Size = size;
            this.AdvTKNoThueGTGT.TabIndex = 0x24;
            this.AdvTKNoThueGTGT.UpperText = true;
            this.AdvTKNoThueGTGT.Value = "";
            this.AdvTKNoThueGTGT.WithCode = 80;
            this.Label18.AutoSize = true;
            point = new Point(13, 0x3a);
            this.Label18.Location = point;
            this.Label18.Name = "Label18";
            size = new Size(0x63, 13);
            this.Label18.Size = size;
            this.Label18.TabIndex = 0x21;
            this.Label18.Text = "TK thu\x00eá nh\x00e2̣p kh\x00e2̉u";
            this.Label2.AutoSize = true;
            point = new Point(13, 0x22);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x4b, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 0x1f;
            this.Label2.Text = "TK thanh toán";
            this.AdvTKThueNhapKhau.Conditions = "";
            this.AdvTKThueNhapKhau.FieldNameFilter = "Left(SoTaiKhoan,3)";
            this.AdvTKThueNhapKhau.KeyFilter = "333";
            point = new Point(0x76, 0x37);
            this.AdvTKThueNhapKhau.Location = point;
            padding = new Padding(0);
            this.AdvTKThueNhapKhau.Margin = padding;
            this.AdvTKThueNhapKhau.Name = "AdvTKThueNhapKhau";
            this.AdvTKThueNhapKhau.OnlyDigit = false;
            this.AdvTKThueNhapKhau.ReadOnly = false;
            size = new Size(290, 20);
            this.AdvTKThueNhapKhau.Size = size;
            this.AdvTKThueNhapKhau.TabIndex = 0x22;
            this.AdvTKThueNhapKhau.UpperText = true;
            this.AdvTKThueNhapKhau.Value = "";
            this.AdvTKThueNhapKhau.WithCode = 80;
            this.AdvTKThanhToan.Conditions = "";
            this.AdvTKThanhToan.FieldNameFilter = "Left(SoTaiKhoan,3)";
            this.AdvTKThanhToan.KeyFilter = "111|331";
            point = new Point(0x76, 30);
            this.AdvTKThanhToan.Location = point;
            padding = new Padding(0);
            this.AdvTKThanhToan.Margin = padding;
            this.AdvTKThanhToan.Name = "AdvTKThanhToan";
            this.AdvTKThanhToan.OnlyDigit = false;
            this.AdvTKThanhToan.ReadOnly = false;
            size = new Size(290, 20);
            this.AdvTKThanhToan.Size = size;
            this.AdvTKThanhToan.TabIndex = 0x20;
            this.AdvTKThanhToan.UpperText = true;
            this.AdvTKThanhToan.Value = "";
            this.AdvTKThanhToan.WithCode = 80;
            this.CmdCancel.DialogResult = DialogResult.Cancel;
            this.CmdCancel.Image = (Image) manager.GetObject("CmdCancel.Image");
            this.CmdCancel.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x156, 0xa1);
            this.CmdCancel.Location = point;
            this.CmdCancel.Name = "CmdCancel";
            size = new Size(0x4f, 0x18);
            this.CmdCancel.Size = size;
            this.CmdCancel.TabIndex = 6;
            this.CmdCancel.Text = "&Tho\x00e1t";
            this.CmdCancel.UseVisualStyleBackColor = true;
            this.CmdOK.Image = (Image) manager.GetObject("CmdOK.Image");
            this.CmdOK.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x102, 0xa1);
            this.CmdOK.Location = point;
            this.CmdOK.Name = "CmdOK";
            size = new Size(0x4e, 0x18);
            this.CmdOK.Size = size;
            this.CmdOK.TabIndex = 5;
            this.CmdOK.Text = "&Chọn";
            this.CmdOK.UseVisualStyleBackColor = true;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x1a9, 0xbf);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.CmdCancel);
            this.Controls.Add(this.CmdOK);
            this.Controls.Add(this.GroupBox1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.Name = "Frm_DinhKhoanNhapKhau";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Text = "GHI SO PHIEU NHAP KHAU";
            this.GroupBox1.ResumeLayout(false);
            this.GroupBox1.PerformLayout();
            this.ResumeLayout(false);
        }

        internal virtual ADVAccount AdvTKCoThueGTGT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTKCoThueGTGT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTKCoThueGTGT = value;
            }
        }

        internal virtual ADVAccount AdvTKNoThueGTGT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTKNoThueGTGT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTKNoThueGTGT = value;
            }
        }

        internal virtual ADVAccount AdvTKThanhToan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTKThanhToan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTKThanhToan = value;
            }
        }

        internal virtual ADVAccount AdvTKThueNhapKhau
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTKThueNhapKhau;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTKThueNhapKhau = value;
            }
        }

        internal virtual Button CmdCancel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdCancel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdCancel = value;
            }
        }

        internal virtual Button CmdOK
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdOK;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdOK_Click);
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click -= handler;
                }
                this._CmdOK = value;
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click += handler;
                }
            }
        }

        public bool GhiSo
        {
            get
            {
                return this.mGhiSo;
            }
            set
            {
                this.mGhiSo = value;
            }
        }

        internal virtual GroupBox GroupBox1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox1 = value;
            }
        }

        internal virtual Label Label18
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label18;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label18 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label20
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label20;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label20 = value;
            }
        }

        internal virtual Label Label62
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label62;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label62 = value;
            }
        }
    }
}

